/*
 * Powered By [Seven]
 * Since 2016 - 2019
 */


package com.czmh.etc.onlinepubsys.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

@Entity
@Table(name = "qr_code_promoter")
public class QrCodePromoter extends BaseModel {
	
	//alias
	public static final String TABLE_ALIAS = "QrCodePromoter";
	public static final String ALIAS_QR_PID = "主键id";
	public static final String ALIAS_QRID = "二维码id";
	public static final String ALIAS_PROMOTERID = "推广员id";
	public static final String ALIAS_CREATETIME = "创建时间";
	 
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	@Id
	@Column(name = "qr_pid")
	private java.lang.String qr_pid;
	@Column(name = "qrid")
	private java.lang.String qrid;
	@Column(name = "promoterid")
	private java.lang.String promoterid;
	@Column(name = "createtime")
	private java.util.Date createtime;
	//columns END

	public QrCodePromoter(){
	}

	public QrCodePromoter(
		java.lang.String qr_pid
	){
		this.qr_pid = qr_pid;
	}

	/**  
	 * 设置主键id  
	 * @param qr_pid 主键id  
	 */  
	public void setQr_pid(java.lang.String qr_pid) {
		this.qr_pid = qr_pid;
	}
	
	/**  
	 * 获取主键id   
	 * @return qr_pid 主键id   
	 */
	public java.lang.String getQr_pid() {
		return this.qr_pid;
	}
	/**  
	 * 设置二维码id  
	 * @param qrid 二维码id  
	 */  
	public void setQrid(java.lang.String qrid) {
		this.qrid = qrid;
	}
	
	/**  
	 * 获取二维码id   
	 * @return qrid 二维码id   
	 */
	public java.lang.String getQrid() {
		return this.qrid;
	}
	/**  
	 * 设置推广员id  
	 * @param promoterid 推广员id  
	 */  
	public void setPromoterid(java.lang.String promoterid) {
		this.promoterid = promoterid;
	}
	
	/**  
	 * 获取推广员id   
	 * @return promoterid 推广员id   
	 */
	public java.lang.String getPromoterid() {
		return this.promoterid;
	}
	/**  
	 * 设置创建时间  
	 * @param createtime 创建时间  
	 */  
	public void setCreatetime(java.util.Date createtime) {
		this.createtime = createtime;
	}
	
	/**  
	 * 获取创建时间   
	 * @return createtime 创建时间   
	 */
	public java.util.Date getCreatetime() {
		return this.createtime;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("qr_pid",getQr_pid())
			.append("qrid",getQrid())
			.append("promoterid",getPromoterid())
			.append("createtime",getCreatetime())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getQr_pid())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof QrCodePromoter == false) {
			return false;
		}
		if(this == obj) {
			return true;
		}
		QrCodePromoter other = (QrCodePromoter)obj;
		return new EqualsBuilder()
			.append(getQr_pid(),other.getQr_pid())
			.isEquals();
	}
}

